using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Smg.Model
{
    public class Project
    {
        private static string _ProjectName;
        private static string _Url;
        private static string _FileType;
        private static string _FilePath;
        private static string _GenerateMode;
        private static string _DbType;
        private static string _ConnectionString;
        private static DataSet _SqlTemplates;

        public Project()
        { 
        }

        public static string ProjectName
        {
            get
            {
                return _ProjectName;
            }
            set
            {
                _ProjectName = value;
            }
        }

        public static string Url
        {
            get
            {
                return _Url;
            }
            set
            {
                _Url = value;
            }
        }

        public static string FileType
        {
            get
            {
                return _FileType;
            }
            set
            {
                _FileType = value;
            }
        }

        public static string FilePath
        {
            get
            {
                return _FilePath;
            }
            set
            {
                _FilePath = value;
            }
        }

        public static string GenerateMode
        {
            get
            {
                return _GenerateMode;
            }
            set
            {
                _GenerateMode = value;
            }
        }

        public static string GetConnection(ArrayList arr,string dbType)
        {
            string strResult ="";
            if (arr != null)
            {
                DbConnectionString dbc = (DbConnectionString)arr[0];
                strResult = dbc.ConnectionString;
                if (dbType != null)
                {
                    strResult = dbc.Destination.ToString();
                }
            }
            return strResult;
        }

        public static string DBType
        {
            get
            {
                return _DbType;
            }
            set
            {
                _DbType = value;
            }
        }

        public static string ConnectionString
        {
            get
            {
                return _ConnectionString;
            }
            set
            {
                _ConnectionString = value;
            }
        }

        public static DataSet SqlTemplates
        {
            get
            {
                return _SqlTemplates;
            }
            set
            {
                _SqlTemplates = value;
            }
        }

    }
}
